<%
if rating.nil? || !is_numeric(rating)
    rating = 0
end
   
rating_in_percent = (Float(rating) / 5) * 100
%>
<div class="rating_bar">
    <%= "<div style=\"width: #{rating_in_percent}% \"></div>" %>
</div>


